﻿using System;
using ApiScanner.Core;
using InfiniTec;

namespace ApiScannerShell.ViewModels
{
    public sealed class FilenameConfigurationElementViewModel : ViewModel<FilenameConfigurationElementViewModel, FilenameConfigurationElement>
    {
        public FilenameConfigurationElementViewModel(FilenameConfigurationElement model) : base(model)
        {
            AddSimpleMapping(viewModel => viewModel.Name, () => Name.IsNullOrEmpty() ? "The name must be specified." : null);
        }

        public string Name
        {
            get { return GetValue(v => v.Name); }
            set { SetValue(v => v.Name, value); }
        }

    }
}